soldGoodsController = BaseController.extend({
	template:'soldGoods',
	center:'在售商品',
	mainView: 'soldGoods',
	goodsListData:new ReactiveVar([]),
	waitOn:function(){
		this.partner = this.currentUser();
		let self = this;
		if(typeof(this.partner.id) != 'undefined'){
		this.get('common/get-partner-goods',{partner_id:this.partner.id,level_name:this.partner.level_name,limit:100}).then(function(res){
			var arr = [];
			var data = res.data;
			for(var i in data){
				arr.push(data[i])
			}
			self.goodsListData.set(arr);
		},function(err){
			console.log(err)
		})
		}
		// /Meteor.subscribe('partnerGoods',this.partner.id, {id:-1},this.partner.level_name);
	},
	onRendered:function(self){
	},
	data: function(){
		let self = this;
		return {
			goods:function(){
				return self.goodsListData.get();
			}
		}
	}
})
